package pack0701.cn;

import jdk.swing.interop.SwingInterOpUtils;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Number {
    public static void main(String[] args) {

        Scanner scan=new Scanner(System.in);
        try{
        System.out.println("请输入第一个值: ");
        int a=scan.nextInt();
        System.out.println("请输入第二个值: ");
        int b=scan.nextInt();

        System.out.println("相乘的结果: "+ a*b);
        } catch(InputMismatchException e){
            System.out.println("输入不匹配异常");
            scan=new Scanner(System.in);
            System.out.println("请重新输入第一个值: ");
        } catch(ArithmeticException e){
            System.out.println("输入数字异常");

        }
    }
}
